<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>雷公王产品浏览器</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
</head>
<body>
    <div class="container">
        <header>
            <h1>雷公王产品浏览器</h1>
        </header>
        
        <div class="main-content">
            <div class="toolbar">
                <div class="toolbar-section">
                    <label for="searchInput">产品搜索:</label>
                    <input type="text" id="searchInput" placeholder="输入产品名称或查询条件...">
                </div>
                
                <div class="toolbar-section">
                    <label for="categoryInput">类别:</label>
                    <input type="text" id="categoryInput" placeholder="输入类别名称">
                </div>
                
                <div class="toolbar-section">
                    <label>价格区间:</label>
                    <div class="price-filter">
                        <input type="number" id="minPrice" placeholder="最低价格">
                        <input type="number" id="maxPrice" placeholder="最高价格">
                        <label style="margin-left: 10px;">
                            <input type="checkbox" id="priceNoneCheckbox"> 搜索价格为 None 的商品
                        </label>
                    </div>
                </div>
                
                <div class="toolbar-section">
                    <label>每页显示:</label>
                    <select id="limitSelect">
                        <option value="10">10条/页</option>
                        <option value="25" selected>25条/页</option>
                        <option value="50">50条/页</option>
                        <option value="100">100条/页</option>
                    </select>
                </div>
                
                <div class="toolbar-section">
                    <label>特性名称和值:</label>
                    <div id="featureContainer">
                        <div class="feature-input-group">
                            <input type="text" class="featureName" placeholder="特性名称">
                            <input type="text" class="featureValue" placeholder="特性值">
                            <button type="button" class="add-feature">+</button>
                        </div>
                    </div>
                </div>
                
                <div class="toolbar-actions">
                    <button id="searchBtn">搜索</button>
                    <button id="resetBtn">重置</button>
                </div>
            </div>
            
            <div class="results-info">
                <span id="resultsCount">显示 0 条结果</span>
            </div>
            
            <div class="table-container">
                <table id="productsTable">
                    <thead>
                        <tr>
                            <th>产品名称</th>
                            <th>价格</th>
                            <th>类别</th>
                            <th>特性</th>
                            <th>链接</th>
                        </tr>
                    </thead>
                    <tbody>
                        <!-- 数据将通过 JavaScript 动态填充 -->
                    </tbody>
                </table>
            </div>
            
            <div class="pagination">
                <button id="firstPage" disabled>首页</button>
                <button id="prevPage" disabled>上一页</button>
                <span id="pageInfo">第 1 页，共 1 页</span>
                <button id="nextPage" disabled>下一页</button>
                <button id="lastPage" disabled>末页</button>
            </div>
        </div>
    </div>
    
    <script src="{{ url_for('static', filename='js/main.js') }}"></script>
</body>
</html>